<?php

/*
 * @description: Форма добавления курса
 * @copyright Copyright (c) 2012-2017 Marin V. , Tykva A. , Kozel R. , Sokolov D.
 * @version 1.0
 * @link http://lecturebox.ru
*/

class Form_AddSubject extends Form_Ru
{
    public function __construct() 
    {
        parent::__construct();
        
        $this->setName('form_addsubject');

        $this->setMethod('post');
        
        $title = new Zend_Form_Element_Text('name');
        $title->setLabel('Название раздела')
                ->setRequired(true)
                ->addValidator('NotEmpty', true)
                ->addFilter('StringTrim') 
                ->addFilter('StripTags'); 
       
        $text = new Zend_Form_Element_Textarea('description');
        $text->setLabel('Описание')
                ->setRequired(true)
                ->addValidator('NotEmpty', true)
                ->addFilter('StringTrim') 
                ->addFilter('StripTags'); 
        
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel('Добавить')
                ->setOptions( array( 'class'=>'btn' ) );

        $this->addElements(array($title, $text, $submit));
        
    }
}